package com.cy.study.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cy.study.entity.ExamEntity;
import com.cy.study.req.ExamPageReq;
import com.cy.study.req.UserExamPageReq;
import com.cy.study.res.ExamPageRes;
import com.cy.study.res.UserCenterPageExamRes;
import com.cy.study.res.UserExamPageRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Component
@Mapper
public interface ExamMapper extends BaseMapper<ExamEntity> {
    Page<ExamPageRes> pageExam(@Param("req") ExamPageReq req,
                               Page page);

    Page<UserCenterPageExamRes> userCenterPageExam(@Param("userId") Integer userId,
                                                   Page page);

    Page<UserExamPageRes> userExamPage(@Param("req") UserExamPageReq req,
                                       Page page);
}
